package com.interview.employeeInfo.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.interview.employeeInfo.entity.EmployeeInfo;
import com.interview.employeeInfo.query.EmployeeInfoConditionQuery;
import com.interview.employeeInfo.repository.EmployeeInfoRepository;

@Service
@Transactional
public class EmployeeInfoService {
	@Resource
	private EmployeeInfoRepository employeeRepository;

	public List<EmployeeInfo> findAll() {
		return employeeRepository.findAll();
	}

	public com.interview.core.page.Page dynamicQuery(
			EmployeeInfoConditionQuery employeeInfoConditionQuery) {
		return employeeRepository.dynamicQuery(employeeInfoConditionQuery);
	}

	public EmployeeInfo save(EmployeeInfo employeeInfo) {
		return employeeRepository.save(employeeInfo);
	}

	public void delet(String id) {
		employeeRepository.delet(id);
	}

	public EmployeeInfo update(EmployeeInfo employeeInfo) {
		return employeeRepository.update(employeeInfo);
	}

	public EmployeeInfo findOne(String id) {
		return employeeRepository.findOne(id);
	}

}
